import request from '@/utils/request';

// 用户相关接口
export const userApi = {
  login: (data) => request.post('/auth/login', data),
  register: (data) => request.post('/auth/register', data),
  getUserInfo: () => request.get('/auth/user-info')
};

// 海域数据相关接口
export const marineApi = {
  // 获取所有海域
  getAllAreas: () => request.get('/v1/marine-areas'),
  // 获取单个海域详情
  getAreaDetail: (id) => request.get(`/v1/marine-areas/${id}`),
  // 获取海域生态指标
  getEcologicalIndicators: (id) => request.get(`/v1/ecological-indicators/${id}`),
  // 获取海域产业评分
  getIndustryScores: (id) => request.get(`/v1/industry-scores/${id}`),
  // 获取综合分析数据
  getAnalysis: (id) => request.get(`/v1/analysis/comprehensive-score/${id}`),
  // 获取产业趋势
  getIndustryTrends: (id) => request.get(`/v1/analysis/industry-trends/${id}`),
  getTemperatureHeatmap: (id) => request.get(`/v1/temperature/heatmap/${id}`),
  getAreaScores: (id) => request.get(`/v1/marine-areas/${id}/scores`),
  getMarineData: (id) => request.get(`/v1/marine-data/${id}`),
  getStationData: (id) => request.get(`/v1/marine-data/${id}/station`),
  getPredictionData: (id) => request.get(`/v1/marine-forecast/${id}`),
};

// 统计相关接口
export const statisticsApi = {
  // 获取总览数据
  getOverview: () => request.get('/v1/statistics/overview'),
  // 获取产业分布
  getIndustryDistribution: () => request.get('/v1/statistics/industry-distribution')
}; 